test textDisp-4.11 {UpdateDisplayInfo, filling in extra vertical space} {
.t delete 1.0 end
.t insert end "1\n2\n3\n4\n5\nLine 6 is such a long line that it wraps around, not once but really quite a few times.\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
.t yview end
update
.t delete 14.0 end
update
list [.t index @0,0] $tk_textRelayout $tk_textRedraw
test textDisp-11.12 {TkTextSetYView, wrapped line is off-screen} {
.t insert 10.0 "Long line with enough text to wrap\n"
.t yview 1.0
update
set tk_textRedraw {}
.t see 10.30
update
list [.t index @0,0] $tk_textRedraw
} {2.0 10.20}
.t delete 10.0 11.0
test textDisp-11.13 {TkTestSetYView, partially-visible last line} {
catch {destroy .top}
toplevel .top
wm geometry .top +0+0
text .top.t -width 20 -height 5
pack .top.t
.top.t insert end "Line 1"
for {set i 2} {$i <= 100} {incr i} {
.top.t insert end "\nLine $i"
}
update
scan [wm geometry .top] "%dx%d" w2 h2
wm geometry .top ${w2}x[expr $h2-2]
update
.top.t yview 1.0
update
set tk_textRedraw {}
.top.t see 5.0
update
list [.top.t index @0,0] $tk_textRedraw
} {2.0 {5.0 6.0}}
catch {destroy .top}
.t configure -wrap word
.t delete 50.0 51.0
.t insert 50.0 "This is a long line, one that will wrap around twice.\n"
test textDisp-12.1 {MeasureUp} {
.t yview 100.0
update
.t yview -pickplace 52.0
update
.t index @0,0
} {50.0}
test textDisp-12.2 {MeasureUp} {
.t yview 100.0
update
.t yview -pickplace 53.0
update
.t index @0,0
} {50.15}
test textDisp-12.3 {MeasureUp} {
.t yview 100.0
update
.t yview -pickplace 50.10
update
.t index @0,0
} {46.0}
.t configure -wrap none
test textDisp-12.4 {MeasureUp} {
.t yview 100.0
update
.t yview -pickplace 53.0
update
.t index @0,0
} {49.0}
test textDisp-12.5 {MeasureUp} {
.t yview 100.0
update
.t yview -pickplace 50.10
update
.t index @0,0
} {46.0}
.t configure -wrap none
.t delete 1.0 end
for {set i 1} {$i < 99} {incr i} {
.t insert end "Line $i\n"
}
.t insert end "Line 100"
.t insert 30.end { is quite long, so that it flows way off the end of the window and we can use it to test out the horizontal positioning features of the "see" command.}